import request from '@/utils/request-dev'
// import qs from 'qs'

// 新增
export function addEvent(param) {
  return request({
    url: '/mbl/Event/addEvent',
    method: 'post',
    data: param
  })
}

export function getEventItem(param) {
  return request({
    url: '/mbl/Event/getEventItem',
    method: 'get',
    params: param
  })
}


export function getEventList(param) {
  return request({
    url: '/mbl/Event/getEventList',
    method: 'get',
    params: param
  })
}

export function updateEvent(param) {
  return request({
    url: '/mbl/Event/updateEvent',
    method: 'post',
    data: param
  })
}

export function deleteEvent(param) {
  return request({
    url: '/mbl/Event/deleteEvent',
    method: 'post',
    data: param
  })
}

// 新闻管理
export function getNewsList(param) {
  return request({
    url: '/mbl/News/getNewsList',
    method: 'get',
    params: param
  })
}

export function addNews(param) {
  return request({
    url: '/mbl/News/addNews',
    method: 'post',
    data: param
  })
}

export function getNewsItem(param) {
  return request({
    url: '/mbl/News/getNewsItem',
    method: 'get',
    params: param
  })
}

export function updateNews(param) {
  return request({
    url: '/mbl/News/updateNews',
    method: 'post',
    data: param
  })
}

export function deleteNews(param) {
  return request({
    url: '/mbl/News/deleteNews',
    method: 'post',
    data: param
  })
}

// 上传图片
export function uploadFile(param) {
  return request({
    contentType: false,
    headers: {'X-Requested-With': 'XMLHttpRequest'},
    url: '/mbl/FileController/uploadFile',
    method: 'post',
    data: param
  })
}

// 轮播图片
export function getIndexPicList(param) {
  return request({
    url: '/mbl/Index/getIndexPicList',
    method: 'get',
    params: param
  })
}

export function addIndexPic(param) {
  return request({
    url: '/mbl/Index/addIndexPic',
    method: 'post',
    data: param
  })
}
export function updateIndexPic(param) {
  return request({
    url: '/mbl/Index/updateIndexPic',
    method: 'post',
    data: param
  })
}

export function deleteIndexPic(param) {
  return request({
    url: '/mbl/Index/deleteIndexPic',
    method: 'post',
    data: param
  })
}

// 新增研究方向列表
export function getResearchList(param) {
  return request({
    url: '/mbl/Research/getResearchList',
    method: 'get',
    params: param
  })
}
export function addResearch(param) {
  return request({
    url: '/mbl/Research/addResearch',
    method: 'post',
    data: param
  })
}
export function updateResearch(param) {
  return request({
    url: '/mbl/Research/updateResearch',
    method: 'post',
    data: param
  })
}
export function deleteResearch(param) {
  return request({
    url: '/mbl/Research/deleteResearch',
    method: 'post',
    data: param
  })
}

export function getResearchItem(param) {
  return request({
    url: '/mbl/Research/getResearchItem',
    method: 'get',
    params: param
  })
}

//更新首页格言
export function updateIndexMotto(param) {
  return request({
    url: '/mbl/Index/updateIndexMotto',
    method: 'post',
    data: param
  })
}

// 获取首页信息
export function getIndexMottoList(param) {
  return request({
    url: '/mbl/Index/getIndexMottoList',
    method: 'get',
    params: param
  })
}

// 更新实验室介绍

export function updateIntroduction(param) {
  return request({
    url: '/mbl/Index/updateIntroduction',
    method: 'post',
    data: param
  })
}

//获取实验四介绍
export function getIntroduction(param) {
  return request({
    url: '/mbl/Index/getIntroduction',
    method: 'get',
    params: param
  })
}

//获取招聘信息
export function getEmployInfo(param) {
  return request({
    url: '/mbl/Index/getEmployInfo',
    method: 'get',
    params: param
  })
}
//修改招聘信息
export function updateEmployInfo(param) {
  return request({
    url: '/mbl/Index/updateEmployInfo',
    method: 'post',
    data: param
  })
}


// 添加代表性文章
export function addResearchArticle(param) {
  return request({
    url: '/mbl/Research/addResearchArticle',
    method: 'post',
    data: param
  })
}

// 删除课题文章
export function deleteResearchArticle(param) {
  return request({
    url: '/mbl/Research/deleteResearchArticle',
    method: 'post',
    data: param
  })
}
